<include file="public@header"/>
<style type="text/css">
    .cdnhide{
        display: none;
    }
</style>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#A" data-toggle="tab">基本设置</a></li>
        <li><a href="#B" data-toggle="tab">登录配置</a></li>
        <li><a href="#M" data-toggle="tab">云存储设置</a></li>
        <li><a href="#O" data-toggle="tab">敏感词</a></li>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" role="form" action="{:url('setting/configpriPost')}"
          method="post">
        <fieldset>
            <div class="tabbable">
                <div class="tab-content">
                    <div class="tab-pane active" id="A">
                        <div class="form-group">
                            <label for="input-cache_switch" class="col-sm-2 control-label">缓存开关</label>
                            <div class="col-md-6 col-sm-10">
                                <label class="radio-inline"><input type="radio" name="options[cache_switch]" value="0" <eq name="config['cache_switch']" value="0">checked</eq>>关闭</label>
                                <label class="radio-inline"><input type="radio" name="options[cache_switch]" value="1" <eq name="config['cache_switch']" value="1">checked</eq> >开启</label>
                                
                            </div>

                        </div>

						<div class="form-group">
                            <label for="input-cache_time" class="col-sm-2 control-label">缓存时间</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-cache_time" name="options[cache_time]" value="{$config['cache_time']|default=''}">  <p class="help-block">网站数据的缓存时间（秒） </p>
                            </div>
                        </div>

						


						

                        <div class="form-group">
                            <label for="input-video_audit_switch" class="col-sm-2 control-label">视频审核开关</label>
                            <div class="col-md-6 col-sm-10">
                                <label class="radio-inline"><input type="radio" name="options[video_audit_switch]" value="0" <eq name="config['video_audit_switch']" value="0">checked</eq>>关闭</label>
                                <label class="radio-inline"><input type="radio" name="options[video_audit_switch]" value="1" <eq name="config['video_audit_switch']" value="1">checked</eq> >开启</label>
                                <p class="help-block">视频审核开关关闭，极光配置->极光推送开关开启，用户发布视频时，粉丝会收到发布视频的推送消息</p>
                            </div>

                        </div>

						
						<div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
						
                    </div>
					
					<!-- 登录配置 -->
					
                    <div class="tab-pane" id="B">


                        <div class="form-group">
                            <label for="input-sendcode_switch" class="col-sm-2 control-label">短信验证码开关</label>
                            <div class="col-md-6 col-sm-10">
                                <label class="radio-inline"><input type="radio" name="options[sendcode_switch]" value="0" <eq name="config['sendcode_switch']" value="0">checked</eq>>关闭</label>
                                <label class="radio-inline"><input type="radio" name="options[sendcode_switch]" value="1" <eq name="config['sendcode_switch']" value="1">checked</eq> >开启</label>
                                <p class="help-block">短信验证码开关,关闭后不再发送真实验证码，采用默认验证码123456</p>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="input-code_switch" class="col-sm-2 control-label">短信接口平台</label>
                            <div class="col-md-6 col-sm-10" id="cdn">
                                <label class="radio-inline"><input type="radio" value="1" name="options[code_switch]" <in value="1" name="config['code_switch']">checked="checked"</in>>阿里云</label>

                                
                               
                            </div>
                        </div>
                        <div class="cdn_bd <neq name='config.code_switch' value='1'>cdnhide</neq>" id="code_switch_1">
                            <div class="form-group">
                                <label for="input-aly_keyid" class="col-sm-2 control-label">阿里云AccessKey ID</label>
                                <div class="col-md-6 col-sm-10">
                                    <input type="text" class="form-control" id="input-aly_keyid" name="options[aly_keyid]" value="{$config['aly_keyid']|default=''}">
                                    <p class="help-block">阿里云控制台==》云通信-》短信服务==》 AccessKey ID </p>
                                </div>
                            </div>

                            <div class="form-group">                            
                                <label for="input-aly_secret" class="col-sm-2 control-label">阿里云AccessKey Secret</label>
                                <div class="col-md-6 col-sm-10">
                                    <input type="text" class="form-control" id="input-aly_secret" name="options[aly_secret]" value="{$config['aly_secret']|default=''}">
                                    <p class="help-block">阿里云控制台==》云通信-》短信服务==》 AccessKey Secret </p>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="input-aly_sendcode_type" class="col-sm-2 control-label">阿里云短信发送区域</label>
                                <div class="col-md-6 col-sm-10">
                                    <label class="radio-inline"><input type="radio" name="options[aly_sendcode_type]" value="1" <eq name="config['aly_sendcode_type']" value="1">checked</eq>>中国大陆</label>
                                    <label class="radio-inline"><input type="radio" name="options[aly_sendcode_type]" value="2" <eq name="config['aly_sendcode_type']" value="2">checked</eq> >港澳台/国际</label>
                                    <label class="radio-inline"><input type="radio" name="options[aly_sendcode_type]" value="3" <eq name="config['aly_sendcode_type']" value="3">checked</eq> >全球</label>
                                    <p class="help-block">如果选择全球，国内、国际/港澳台等信息都需要配置</p>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="input-aly_signName" class="col-sm-2 control-label">国内短信签名</label>
                                <div class="col-md-6 col-sm-10">
                                    <input type="text" class="form-control" id="input-aly_signName" name="options[aly_signName]" value="{$config['aly_signName']|default=''}">
                                    <p class="help-block">阿里云控制台==》云通信==》短信服务==》国内消息==》签名管理 </p>
                                </div>
                            </div>

                            <div class="form-group">                            
                                <label for="input-aly_templateCode" class="col-sm-2 control-label">国内短信模板ID</label>
                                <div class="col-md-6 col-sm-10">
                                    <input type="text" class="form-control" id="input-aly_templateCode" name="options[aly_templateCode]" value="{$config['aly_templateCode']|default=''}">
                                    <p class="help-block">阿里云控制台==》云通信==》短信服务==》国内消息==》 短信模板ID </p> 
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="input-aly_hw_signName" class="col-sm-2 control-label">国际/港澳台短信签名</label>
                                <div class="col-md-6 col-sm-10">
                                    <input type="text" class="form-control" id="input-aly_hw_signName" name="options[aly_hw_signName]" value="{$config['aly_hw_signName']|default=''}">  阿里云控制台==》云通信-》短信服务==》国际/港澳台消息==》 短信签名
                                </div>
                            </div>

                            <div class="form-group">                            
                                <label for="input-aly_hw_templateCode" class="col-sm-2 control-label">国际/港澳台短信模板ID</label>
                                <div class="col-md-6 col-sm-10">
                                    <input type="text" class="form-control" id="input-aly_hw_templateCode" name="options[aly_hw_templateCode]" value="{$config['aly_hw_templateCode']|default=''}">  阿里云控制台==》云通信-》短信服务==》国际/港澳台消息==》 短信模板ID 
                                </div>
                            </div>
                        
                        </div>


                        
						
                        <div class="form-group">
                            <label for="input-iplimit_switch" class="col-sm-2 control-label">短信验证码IP限制开关</label>
                            <div class="col-md-6 col-sm-10">
                                <label class="radio-inline"><input type="radio" name="options[iplimit_switch]" value="0" <eq name="config['iplimit_switch']" value="0">checked</eq>>关闭</label>
                                <label class="radio-inline"><input type="radio" name="options[iplimit_switch]" value="1" <eq name="config['iplimit_switch']" value="1">checked</eq> >开启</label>
                                <p class="help-block">短信验证码IP限制开关</p>
                            </div>
                        </div>
						
						<div class="form-group">
                            <label for="input-iplimit_times" class="col-sm-2 control-label">短信验证码IP限制次数</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-iplimit_times" name="options[iplimit_times]" value="{$config['iplimit_times']|default=''}">  <p class="help-block">同一IP每天可以发送验证码的最大次数</p>
                            </div>
                        </div>
						
                        <div class="form-group">
                            <label for="input-same_device_ip_regnums" class="col-sm-2 control-label">同设备同ip可注册用户数</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-same_device_ip_regnums" name="options[same_device_ip_regnums]" value="{$config['same_device_ip_regnums']|default=''}">  <p class="help-block">同一设备同一IP下最多可注册用户数，0表示不限制</p>
                            </div>
                        </div>
						
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
	

					
					
					<!-- 云存储设置 -->
                    <div class="tab-pane" id="M">
                        
						<div class="form-group">
							<label for="input-sex" class="col-sm-2 control-label">选择存储方式</label>
							<div class="col-md-6 col-sm-10" id="cloudtype">
								
								<label class="radio-inline"><input type="radio" name="options[cloudtype]" value="1" <eq name="config['cloudtype']" value="1">checked="checked"</eq>>七牛云存储</label>

							</div>
						</div>
						
						<div id="cloudtype_1" class="cloudtype_hide <neq name="config['cloudtype']" value="1">hide</neq>">

                            <div class="form-group">
                                <label for="input-qiniu_accesskey" class="col-sm-2 control-label">注意：</label>
                                <div class="col-md-6 col-sm-10">
                                    <p class="help-block">1、在七牛云创建存储空间 选择存储区域【非华东】后，在 PhalApi/Appapi/Api/Video.php/getCosInfo方法/qiniuInfo/qiniu_zone 要进行相应存储区域的替换【代码中有备注】,否则app上传失败</p>
                                    <p class="help-block">2、在七牛云创建存储空间 选择存储区域【非华东】后，在 PhalApi/Library/Qiniu/qiniu/conf.php/QINIU_UP_HOST 要进行相应服务端上传域名的替换【代码中有备注】,否则app在修改头像等会提示上传失败</p>
                                </div>
                            </div>


                            <div class="form-group">
                                <label for="input-qiniu_zone" class="col-sm-2 control-label">七牛云存储区域</label>
                                <div class="col-md-6 col-sm-10" id="qiniu_zone">
                                    
                                    <label class="radio-inline"><input type="radio" name="options[qiniu_zone]" value="z0" <eq name="config['qiniu_zone']" value="z0">checked="checked"</eq>>华东</label>
                                    <label class="radio-inline"><input type="radio" name="options[qiniu_zone]" value="z1" <eq name="config['qiniu_zone']" value="z1">checked="checked"</eq>>华北</label>
                                    <label class="radio-inline"><input type="radio" name="options[qiniu_zone]" value="z2" <eq name="config['qiniu_zone']" value="z2">checked="checked"</eq>>华南</label>
                                    <label class="radio-inline"><input type="radio" name="options[qiniu_zone]" value="na0" <eq name="config['qiniu_zone']" value="na0">checked="checked"</eq>>北美</label>
                                    <label class="radio-inline"><input type="radio" name="options[qiniu_zone]" value="as0" <eq name="config['qiniu_zone']" value="as0">checked="checked"</eq>>东南亚</label>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="input-qiniu_protocol" class="col-sm-2 control-label">七牛存储域名协议</label>
                                <div class="col-md-6 col-sm-10" id="qiniu_protocol">
                                    
                                    <label class="radio-inline"><input type="radio" name="options[qiniu_protocol]" value="http" <eq name="config['qiniu_protocol']" value="http">checked="checked"</eq>>http</label>
                                    <label class="radio-inline"><input type="radio" name="options[qiniu_protocol]" value="https" <eq name="config['qiniu_protocol']" value="https">checked="checked"</eq>>https</label>
                                    
                                </div>
                            </div>
						
							<div class="form-group">
								<label for="input-qiniu_accesskey" class="col-sm-2 control-label">七牛云存储accessKey</label>
								<div class="col-md-6 col-sm-10">
									<input type="text" class="form-control" id="input-qiniu_accesskey" name="options[qiniu_accesskey]" value="{$config['qiniu_accesskey']|default=''}">
								</div>
							</div>
							<div class="form-group">
								<label for="input-qiniu_secretkey" class="col-sm-2 control-label">七牛云存储secretKey</label>
								<div class="col-md-6 col-sm-10">
									<input type="text" class="form-control" id="input-qiniu_secretkey" name="options[qiniu_secretkey]" value="{$config['qiniu_secretkey']|default=''}">
								</div>
							</div>
							<div class="form-group">
								<label for="input-qiniu_bucket" class="col-sm-2 control-label">七牛云存储bucket</label>
								<div class="col-md-6 col-sm-10">
									<input type="text" class="form-control" id="input-qiniu_bucket" name="options[qiniu_bucket]" value="{$config['qiniu_bucket']|default=''}">
								</div>
							</div>
							<div class="form-group">
								<label for="input-qiniu_domain" class="col-sm-2 control-label">七牛云存储空间域名</label>
								<div class="col-md-6 col-sm-10">
									<input type="text" class="form-control" id="input-qiniu_domain" name="options[qiniu_domain]" value="{$config['qiniu_domain']|default=''}"><p class="help-block">不带http://或https://，不要以/结尾；如qiniudemo.yunbaozhibo.com</p>
								</div>
							</div>
							
						
						</div>

	
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>

					
					<!-- 敏感词 -->
                    <div class="tab-pane" id="O">

                        <div class="form-group">
                            <label for="input-watch_video_type" class="col-sm-2 control-label">关键词<p class="help-block">多词间用英文,分隔 如：敏感词1,敏感词2,敏感词3</p></label>
                            
                            <div class="col-md-6 col-sm-10">
                                <textarea type="text" class="form-control" id="input-sensitive_words" name="options[sensitive_words]" style="height: 400px;">{$config['sensitive_words']|default=''}</textarea>
                                <p class="help-block">用于视频标题、视频评论、用户昵称、个性签名等。</p>
                            </div>
                        </div>

    
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
					




                    </div>
					
                </div>
            </div>
        </fieldset>
    </form>

</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
 <script>
	(function(){
		$("#cloudtype label.radio-inline").on('click',function(){
			var v=$("input",this).val();
	
			
			$(".cloudtype_hide").addClass('hide');
			
			$("#cloudtype_"+v).removeClass('hide');
		
		})

       $("#cdn label").on('click',function(){
            var v_d=$("input",this).attr('disabled');
            if(v_d=='disabled'){
                return !1;
            }
            var v=$("input",this).val();
            var b=$("#code_switch_"+v);
            $(".cdn_bd").hide();
            b.show();
        })
	})()
	</script>
</body>
</html>
